from typing import List

from langchain_ollama import ChatOllama

from common_config import CHAT_OLLAMA_MODEL


def validate_user(user_id: str, addressed: List) -> bool:
    """validate user using historical addresses.

    Args:
        user_id: (int) the user id
        addressed: Previous addresses.
    """
    return True


llm = ChatOllama(
    model=CHAT_OLLAMA_MODEL,
    temperature=0,
).bind_tools({validate_user})

result = llm.invoke(
    "Could you validate user 123? They previously lived at "
    "123 Fake St in Boston MA and 234 Pretend Boulevard in "
    "Huuston TX"
)

var = result.tool_calls
print(var)